#ifndef _SPI_H__
#define _SPI_H__

#include <ioCC2541.h>
#include "my_types.h"

#define CS              P1_2
#define SCK             P1_3
#define MISO            P1_4
#define MOSI            P1_5


#define CS_DISABLED     1
#define CS_ENABLED      0

void spi_init(void);
void spi_write_byte(unsigned char write);
void spi_read_byte(unsigned char *read, unsigned char write);
void spi_slave_init(void);



#endif
